<style>
    #obj-update {
        padding: 20px 25px 25px 0;
    }

    #obj-update .layui-treeSelect .ztree li a, .ztree li span {
        margin: 0 0 2px 3px !important;
    }
</style>
<div class="layui-fluid" id="obj-update">
    <form class="layui-form" action="" lay-filter="obj-update-form">
                        <div class="layui-form-item febs-hide">
                    <label class="layui-form-label febs-form-item-require">记录id：</label>
                    <div class="layui-input-block">
                        <input type="text" name="id" data-th-value="${obj.id}">
                    </div>
                </div>
                <div class="layui-form-item">
                    <label class="layui-form-label febs-form-item-require">事项编号：</label>
                    <div class="layui-input-block">
                        <input type="text" name="serviceCode" autocomplete="off" class="layui-input">
                    </div>
                </div>
                <div class="layui-form-item">
                    <label class="layui-form-label febs-form-item-require">事项名称：</label>
                    <div class="layui-input-block">
                        <input type="text" name="serviceName" autocomplete="off" class="layui-input">
                    </div>
                </div>
                <div class="layui-form-item">
                    <label class="layui-form-label febs-form-item-require">法定期限：</label>
                    <div class="layui-input-block">
                        <input type="text" name="legalDays" autocomplete="off" class="layui-input">
                    </div>
                </div>
                <div class="layui-form-item">
                    <label class="layui-form-label febs-form-item-require">所属大厅ID：</label>
                    <div class="layui-input-block">
                        <input type="text" name="hallId" autocomplete="off" class="layui-input">
                    </div>
                </div>
                <div class="layui-form-item">
                    <label class="layui-form-label febs-form-item-require">所属部门ID：</label>
                    <div class="layui-input-block">
                        <input type="text" name="deptId" autocomplete="off" class="layui-input">
                    </div>
                </div>
                <div class="layui-form-item">
                    <label class="layui-form-label febs-form-item-require">所属部门名称：</label>
                    <div class="layui-input-block">
                        <input type="text" name="deptName" autocomplete="off" class="layui-input">
                    </div>
                </div>
                <div class="layui-form-item">
                    <label class="layui-form-label febs-form-item-require">承诺时限：</label>
                    <div class="layui-input-block">
                        <input type="text" name="promiseDays" autocomplete="off" class="layui-input">
                    </div>
                </div>
                <div class="layui-form-item">
                    <label class="layui-form-label febs-form-item-require">材料说明：</label>
                    <div class="layui-input-block">
                        <input type="text" name="materialDesc" autocomplete="off" class="layui-input">
                    </div>
                </div>
                <div class="layui-form-item">
                    <label class="layui-form-label febs-form-item-require">实施编码：</label>
                    <div class="layui-input-block">
                        <input type="text" name="implementCode" autocomplete="off" class="layui-input">
                    </div>
                </div>
                <div class="layui-form-item">
                    <label class="layui-form-label febs-form-item-require">业务办理项编码：</label>
                    <div class="layui-input-block">
                        <input type="text" name="taskhandleitem" autocomplete="off" class="layui-input">
                    </div>
                </div>
                <div class="layui-form-item">
                    <label class="layui-form-label febs-form-item-require">所属部门编码：</label>
                    <div class="layui-input-block">
                        <input type="text" name="deptCode" autocomplete="off" class="layui-input">
                    </div>
                </div>
                <div class="layui-form-item">
                    <label class="layui-form-label febs-form-item-require">所属区域编码：</label>
                    <div class="layui-input-block">
                        <input type="text" name="areaCode" autocomplete="off" class="layui-input">
                    </div>
                </div>
                <div class="layui-form-item">
                    <label class="layui-form-label febs-form-item-require">区划名称：</label>
                    <div class="layui-input-block">
                        <input type="text" name="areaName" autocomplete="off" class="layui-input">
                    </div>
                </div>
                <div class="layui-form-item">
                    <label class="layui-form-label febs-form-item-require">收费情况：</label>
                    <div class="layui-input-block">
                        <input type="text" name="price" autocomplete="off" class="layui-input">
                    </div>
                </div>
                <div class="layui-form-item">
                    <label class="layui-form-label febs-form-item-require">事项类型：</label>
                    <div class="layui-input-block">
                        <input type="text" name="serviceType" autocomplete="off" class="layui-input">
                    </div>
                </div>
                <div class="layui-form-item">
                    <label class="layui-form-label febs-form-item-require">办理渠道：</label>
                    <div class="layui-input-block">
                        <input type="text" name="handleChannel" autocomplete="off" class="layui-input">
                    </div>
                </div>
                <div class="layui-form-item">
                    <label class="layui-form-label febs-form-item-require">星级：</label>
                    <div class="layui-input-block">
                        <input type="text" name="starLevel" autocomplete="off" class="layui-input">
                    </div>
                </div>
                <div class="layui-form-item">
                    <label class="layui-form-label febs-form-item-require">是否智能审批：</label>
                    <div class="layui-input-block">
                        <input type="text" name="smartFlag" autocomplete="off" class="layui-input">
                    </div>
                </div>
                <div class="layui-form-item">
                    <label class="layui-form-label febs-form-item-require">排序号：</label>
                    <div class="layui-input-block">
                        <input type="text" name="sortid" autocomplete="off" class="layui-input">
                    </div>
                </div>
                <div class="layui-form-item">
                    <label class="layui-form-label febs-form-item-require">是否删除：</label>
                    <div class="layui-input-block">
                        <input type="text" name="isDel" autocomplete="off" class="layui-input">
                    </div>
                </div>
                <div class="layui-form-item">
                    <label class="layui-form-label febs-form-item-require">数据来源分类（1= 权责清单 2=行政审批 3=政务服务）：</label>
                    <div class="layui-input-block">
                        <input type="text" name="sourceFlag" autocomplete="off" class="layui-input">
                    </div>
                </div>
                <div class="layui-form-item">
                    <label class="layui-form-label febs-form-item-require">省网地址：</label>
                    <div class="layui-input-block">
                        <input type="text" name="webApplyUrl" autocomplete="off" class="layui-input">
                    </div>
                </div>
            <div class="layui-form-item febs-hide">
                <button class="layui-btn" lay-submit="" lay-filter="obj-update-form-submit" id="submit"></button>
            </div>
    </form>
</div>

<script data-th-inline="javascript">
    layui.use(['febs', 'form', 'formSelects', 'validate', 'treeSelect'], function () {
        var $ = layui.$,
            febs = layui.febs,
            layer = layui.layer,
            form = layui.form,
            obj = [[${obj}]],
            $view = $('#obj-update'),
            validate = layui.validate;

        form.verify(validate);
        form.render();

        initobjValue();


        function initobjValue() {
            form.val("obj-update-form", {
                "id": obj.id,
                "serviceCode": obj.serviceCode,
                "serviceName": obj.serviceName,
                "legalDays": obj.legalDays,
                "hallId": obj.hallId,
                "deptId": obj.deptId,
                "deptName": obj.deptName,
                "promiseDays": obj.promiseDays,
                "materialDesc": obj.materialDesc,
                "implementCode": obj.implementCode,
                "taskhandleitem": obj.taskhandleitem,
                "deptCode": obj.deptCode,
                "areaCode": obj.areaCode,
                "areaName": obj.areaName,
                "price": obj.price,
                "serviceType": obj.serviceType,
                "handleChannel": obj.handleChannel,
                "starLevel": obj.starLevel,
                "smartFlag": obj.smartFlag,
                "sortid": obj.sortid,
                "isDel": obj.isDel,
                "sourceFlag": obj.sourceFlag,
                "webApplyUrl": obj.webApplyUrl,
            });
        }

        form.on('submit(obj-update-form-submit)', function (data) {
            if (febs.nativeEqual(data.field, obj)) {
                febs.alert.warn('数据未作任何修改！');
                return false;
            }
            febs.post(ctx + 'service/update', data.field, function () {
                layer.closeAll();
                febs.alert.success('数据修改成功');
                $('#febs-obj').find('#query').click();
            });
            return false;
        });
    });
</script>